import wxp from 'minapp-api-promise'

export function fade (opacity) {
  let animation = wxp.createAnimation({
    duration: 200
  })
  animation.opacity(opacity).step()
  return animation.export()
}
